label: Include all of the allocation in the clip
authorBenjamin Otte <otte@redhat.com>
Sat, 12 Jul 2014 03:32:12 +0000 (05:32 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 12 Jul 2014 05:13:28 +0000 (07:13 +0200)
Otherwise, the CSS background we draw would be clipped if the ink rect
was smaller than the allocation (a very common thing).

Broken since 37030a771059f43ad701700380719d19cbc7c966 where we clipped
to the ink rect.

gtk/gtklabel.c

index 3c64322110b3ac1df8de2f03d79d3fa41e218e5b..17b4ca31a351b53b0f79c88d8f01aeb13d65e472 100644 (file)
@@ -3996,6 +3996,7 @@ gtk_label_size_allocate (GtkWidget     *widget,
     }
 
   gtk_label_get_ink_rect (label, &clip_rect);
+  gdk_rectangle_union (&clip_rect, allocation, &clip_rect);
   gtk_widget_set_clip (widget, &clip_rect);
 }